package com.ciei.dpagm.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.ciei.dpagm.common.annotation.DefaultValue;
import com.ciei.dpagm.util.DateUtil;


import java.util.Date;

@TableName(value = "common_role")
public class Role implements java.io.Serializable{

    /**
     * 系统管理员
     */
    public final static Integer SYSTEM_ROLE_ID_ADMIN = 1000;

    /**
     * 主程序企业版
     */
    public static final Integer SYSTEM_ROLE_ID_ENTERPRISE_EDITION = 1001;

    /**
     * 中控后台管理员
     */
    public static final Integer SYSTEM_ROLE_ID_CENTRAL_CONTROL = 1002;

    @TableId(type = IdType.AUTO)
    private Integer roleId;
    private String roleName;
    private String remark;
    private Integer orderId;
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDelete;
    @TableField(fill = FieldFill.INSERT)
    @DefaultValue(intValue = 0)
    private Integer isSystem;
    private String roleCode;
    @TableField(fill = FieldFill.INSERT)
    @DefaultValue(intValue = 1)
    private Integer enable;
    @TableField(fill = FieldFill.UPDATE)
    @JSONField(format= DateUtil.FORMAT_LONG)
    private Date updateTime;

    public Role(){

    }

    public Role(Integer roleId, String roleName, String remark, Integer orderId, Integer isDelete, Integer isSystem, String roleCode, Integer enable, Date updateTime) {
        this.roleId = roleId;
        this.roleName = roleName;
        this.remark = remark;
        this.orderId = orderId;
        this.isDelete = isDelete;
        this.isSystem = isSystem;
        this.roleCode = roleCode;
        this.enable = enable;
        this.updateTime = updateTime;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }


    public Integer getIsSystem() {
        return isSystem;
    }

    public void setIsSystem(Integer isSystem) {
        this.isSystem = isSystem;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
